class CreatePages < ActiveRecord::Migration
  def self.up
    create_table :pages do |t|
      t.column :title,            :string
      t.column :body,             :text
      t.column :comments_count,   :integer, :default => 0
      #automated column
      t.column :created_by, :integer
      t.column :updated_by, :integer
      t.column :created_on,      :datetime
      t.column :updated_on,      :datetime
    end
  end

  def self.down
    drop_table :pages
  end
end
